package com.example.travel.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.travel.domain.entity.Spot;
import com.example.travel.domain.response.SpotUserAndNumber;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author : LinQingLiang
 * @file : SpotMapper.java
 * @Since : 2023/2/5 14:13
 */

@Mapper
public interface SpotMapper extends BaseMapper<Spot> {

    Page page(@Param("page") Page<Spot> page, @Param(Constants.WRAPPER) Wrapper<Spot> qw);

    List<SpotUserAndNumber> userSelectSpot(@Param("spotId") Integer id,@Param("state") String state);

    int updateArticle(@Param("id") Integer id,@Param("spotName") String spotName);

    String selectByArticleId(@Param("articleId") Integer id);

}
